import torch as pt

x = pt.arange(1, 3*4+1).view(3, 4)
print(x)

x.view(2, 6)  # ATTENTION view is not inplace
print(x)

x = x.view(2, 6)
print(x)
